<?php

$dbname = "smetki";
$dbhost = "127.0.0.1";
$dbuser = "root";
$dbpass = "talasam";
date_default_timezone_set('Europe/Helsinki');		
$backupFile = "/Users/giormov/".$dbname . date("Y-m-d-H-i-s") . '.gz';
$command = "mysqldump --opt -h $dbhost -u $dbuser --password=$dbpass $dbname | gzip > $backupFile";
echo $command."<br/>";
echo system($command, $output)."<br/>";
echo $output;

?>